package com.jindy.module.returnapplyorder.service.impl;

import java.util.List;

import com.jindy.module.returnapplyorder.domain.ReturnApplyProduct;
import com.jindy.module.returnapplyorder.mapper.ReturnApplyProductMapper;
import com.jindy.module.returnapplyorder.service.IReturnApplyProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 回库申请单产品Service业务层处理
 *
 * @author ruoyi
 * @date 2022-10-19
 */
@Service
public class ReturnApplyProductServiceImpl implements IReturnApplyProductService
{
    @Autowired
    private ReturnApplyProductMapper returnApplyProductMapper;

    /**
     * 查询回库申请单产品
     *
     * @param id 回库申请单产品主键
     * @return 回库申请单产品
     */
    @Override
    public ReturnApplyProduct selectReturnApplyProductById(Long id)
    {
        return returnApplyProductMapper.selectReturnApplyProductById(id);
    }

    /**
     * 查询回库申请单产品列表
     *
     * @param returnApplyProduct 回库申请单产品
     * @return 回库申请单产品
     */
    @Override
    public List<ReturnApplyProduct> selectReturnApplyProductList(ReturnApplyProduct returnApplyProduct)
    {
        return returnApplyProductMapper.selectReturnApplyProductList(returnApplyProduct);
    }

    /**
     * 新增回库申请单产品
     *
     * @param returnApplyProduct 回库申请单产品
     * @return 结果
     */
    @Override
    public int insertReturnApplyProduct(ReturnApplyProduct returnApplyProduct)
    {
        return returnApplyProductMapper.insertReturnApplyProduct(returnApplyProduct);
    }

    /**
     * 修改回库申请单产品
     *
     * @param returnApplyProduct 回库申请单产品
     * @return 结果
     */
    @Override
    public int updateReturnApplyProduct(ReturnApplyProduct returnApplyProduct)
    {
        return returnApplyProductMapper.updateReturnApplyProduct(returnApplyProduct);
    }

    /**
     * 批量删除回库申请单产品
     *
     * @param ids 需要删除的回库申请单产品主键
     * @return 结果
     */
    @Override
    public int deleteReturnApplyProductByIds(Long[] ids)
    {
        return returnApplyProductMapper.deleteReturnApplyProductByIds(ids);
    }

    /**
     * 删除回库申请单产品信息
     *
     * @param id 回库申请单产品主键
     * @return 结果
     */
    @Override
    public int deleteReturnApplyProductById(Long id)
    {
        return returnApplyProductMapper.deleteReturnApplyProductById(id);
    }
}
